var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(mode, type, selection) {
    var reactor = "action" + (cm.getMapId() - 940205000);
    eval(reactor)(mode, type, selection)
}

function action100(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.addPopupSay(3001500 + cm.getPlayer().getGender(), 1000, "#face8#近处的敌人还不是全部。还在继续涌来。", "", 0);
            cm.playerMessage(-1, "必须消灭掉区域内的所有怪物，才能移动到下一关。");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/stage");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/number/1");
            cm.dispose()
        }
    }
}

function action200(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.playerMessage(-1, "必须消灭掉区域内的所有怪物，才能移动到下一关。");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/stage");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/number/2");
            cm.dispose()
        }
    }
}

function action300(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.playerMessage(-1, "必须消灭掉区域内的所有怪物，才能移动到下一关。");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/final");
            cm.dispose()
        }
    }
}

function action400(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.addPopupSay(3001500 + cm.getPlayer().getGender(), 1000, "#face8#第一次看见这样的士兵。好像不是幽灵。是佣兵吗？", "", 0);
            cm.playerMessage(-1, "必须消灭掉区域内的所有怪物，才能移动到下一关。");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/stage");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/number/1");
            cm.dispose()
        }
    }
}

function action500(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.playerMessage(-1, "必须消灭掉区域内的所有怪物，才能移动到下一关。");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/stage");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/number/2");
            cm.dispose()
        }
    }
}

function action600(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.playerMessage(-1, "必须消灭掉区域内的所有怪物，才能移动到下一关。");
            cm.fieldEffect_ScreenMsg("monsterPark/stageEff/final");
            cm.dispose()
        }
    }
};